<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户管理</title>
#include("../jscss.html")
<script type="text/javascript">
	$(function(){
		//查询结果表格
		var grid = $('#data-grid');
		grid.datagrid({
			border:false,
			columns:[[
			    {field:'ck',checkbox:true},
			    {field:"id", title:"ID", hidden:'true'},
			    {field:"bank", title:"归属"},
			    {field:"flag", title:"上下行"},
			    {field:"business", title:"业务"},	
				{field:'trackingID',title:'快递单号',width:160,formatter:function(val,row){
					return '<a href="detail?expressinfo.trackingID='+row.trackingID+'">'+val+'</a>'
				}},
				{field:'source',title:'始发网点',width:160},
				{field:'destination',title:'目的网点',width:160},
				{field:'sendDate',title:'发件时间',width:80},
				{field:'receiveDate',title:'收件时间',width:80},
				{field:'state',title:'状态',width:100},
				{field:'abnormal',title:'异常',width:100},
			]],
			fit:true,
			pagination:true,
			rownumbers:true,
			url:'expressList',
			pageList:[10,20,30,50,100],
			pageSize:20,
			toolbar:'#tb',
			singleSelect:true,
			nowrap:false,
			striped:true
		});
		
		$('#search').click(function(){
			var jsonParam = $('#search-form').serializeJsonNotNull();
			grid.datagrid('load', jsonParam);
		});
		$('#detail').click(function(){
			if($('#data-grid').datagrid('getSelected')==null){
				$.messager.alert('提醒','请选择一条查看的数据')
				return false;
			}
			window.location.replace('detail?expressinfo.trackingID='+$('#data-grid').datagrid('getSelected').trackingID);
		});
		
	});
	$(function(){
		   var curr_time = new Date();
		   var strDate = curr_time.getFullYear()+"-";
		   strDate += curr_time.getMonth()+1+"-";
		   strDate += curr_time.getDate()+"-";
		   strDate += curr_time.getHours()+":";
		   strDate += curr_time.getMinutes()+":";
		   strDate += curr_time.getSeconds();
		   $("#date").datebox("setValue", strDate); 
		  });

</script>
</head>
<body>
	<table id="data-grid">
	</table>
	<div id="tb" style="padding: 5px; height: auto">
		<div>
			<form id="search-form">
			发送日期: <input  id="date" class="easyui-datebox" type="text" name="expressinfo.sendDate" style="width: 120px">
			类型：<select id="type" class="easyui-combobox" name="expressinfo.flag" style="width:200px;">
						    <option value="10" >上下行</option>
						    <option value="1" >上行</option>
						    <option value="0">下行</option>
				</select>
			状态：<select id="state" class="easyui-combobox" name="expressinfo.state" style="width:200px;">
					    <option value="10" >所有情况</option>
					    <option value="1" >运输中</option>
					    <option value="0">已验收</option>
					    <option value="2">退回银行</option>
				</select>
			异常：<select id="abnormal" class="easyui-combobox" name="expressinfo.abnormal" style="width:200px;">
						<option value="10" >所有情况</option>
						<option value="0" >正常</option>
						<option value="2" >路线异常</option>
						<option value="1">操作异常</option>
						<option value="3">超时</option>
				</select>
			<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="search">查询</a>
			<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="detail">详情</a>			
			</form>
		</div>
	</div>
</body>
</html>